<?php

/**
 * 
 */
 
class phplister21 extends Plugin
{
    //    internal variables
    
    //    Constructor
    function __construct ( ){
        parent::__construct();
        $this->scope[]   = 'Item_trouverMeta';   
        $this->droits    = 'USER';
        $this->nom       = 'phpLister2.1';
        $this->className = 'phplister21';
        $this->desc      = 'Improvments for phplister.';
        $this->uniId     = 'phplister21UNIID';
        $this->version   = '0.1';
        $this->content   =  '';
        
        
    }    
    
	public function Item_trouverMeta(&$item)
	{
		/*
		<meta>
   <image>
       <x>2048</x>
       <y>1536</y>
       <type>jpg</type>
       <exif>
           <date>2007:10:06 17:47:54</date>
           <info>Sony Ericsson, K800i</info>
       </exif>
   </image>
</meta>
*/
		if(!empty($item->out))
		{
			$xml = simplexml_load_string($item->out);
			if(!empty($xml->x) && !empty($xml->y))
			{
				$item->addTagsItem($xml->x.'x'.$xml->y);
			}
		}
	}

}


?>
